package com.qys.livesMall.shop.modal.query;

import com.qys.livesMall.framework.view.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.List;

@Data
public class ShopStatisticsQuery extends BaseQuery {

    /***************用户信息*************/
    @Schema(description = "用户名")
    private String userName;

    @Schema(description = "昵称")
    private String nickName;

    @Schema(description = "状态")
    private Integer userStatus;

    @Schema(description = "用户系统类型（0：水军，1：正常用户）")
    private Integer userSysType;



    @Schema(description = "上级用户（用户账号）")
    private String supUserName;

    @Schema(description = "代理用户（用户账号）")
    private String poxUserName;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "邀请码")
    private String inviteCode;


    @Schema(description = "用户直推")
    private String userDirectPush;

    @Schema(description = "用户三代")
    private String user3rdGeneration;

    @Schema(description = "用户伞下")
    private String userUnderUmbrella;


    /*************店铺************/
    @Schema(description = "店铺编码")
    private Integer shopCode;
    @Schema(description = "状态")
    private String shopStatus;

    @Schema(description = "余额范围下限")
    private BigDecimal balanceStart;

    @Schema(description = "余额范围上限")
    private BigDecimal balanceEnd;

    @Schema(description = "店铺名称")
    private String shopName;

    @Schema(description = "店铺等级")
    private Integer shopLevelId;

    @Schema(description = "店铺层级")
    private String storey;

    @Schema(description = "是否充值")
    private Integer charged;

    @Schema(description = "钱包地址")
    private String bankNo;
    @Schema(description = "ip地址")
    private String ip;




    private List<Long> shopIds;

    private List<Long> userIds;


    /**
     * 是否执行查询
     */
    private boolean exc =false;

    public void setShopCode(Integer shopCode) {
        this.shopCode = shopCode;
        listener(shopCode);
    }

    public void setUserName(String userName) {
        this.userName = userName;
        listener(userName);
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
        listener(nickName);
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
        listener(userStatus);
    }

    public void setUserSysType(Integer userSysType) {
        this.userSysType = userSysType;
        listener(userSysType);
    }

    public void setIp(String ip) {
        this.ip = ip;
        listener(ip);
    }

    public void setSupUserName(String supUserName) {
        this.supUserName = supUserName;
        listener(supUserName);
    }

    public void setPoxUserName(String poxUserName) {
        this.poxUserName = poxUserName;
        listener(poxUserName);
    }

    public void setPhone(String phone) {
        this.phone = phone;
        listener(phone);
    }

    public void setEmail(String email) {
        this.email = email;
        listener(email);
    }

    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
        listener(inviteCode);
    }

    public void setUserDirectPush(String userDirectPush) {
        this.userDirectPush = userDirectPush;
        listener(userDirectPush);
    }

    public void setUser3rdGeneration(String user3rdGeneration) {
        this.user3rdGeneration = user3rdGeneration;
        listener(user3rdGeneration);
    }

    public void setUserUnderUmbrella(String userUnderUmbrella) {
        this.userUnderUmbrella = userUnderUmbrella;
        listener(userUnderUmbrella);
    }

    public void setShopStatus(String shopStatus) {
        this.shopStatus = shopStatus;
        listener(shopStatus);
    }

    public void setBalanceStart(BigDecimal balanceStart) {
        this.balanceStart = balanceStart;
        listener(balanceStart);
    }

    public void setBalanceEnd(BigDecimal balanceEnd) {
        this.balanceEnd = balanceEnd;
        listener(balanceEnd);
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
        listener(shopName);
    }

    public void setShopLevelId(Integer shopLevelId) {
        this.shopLevelId = shopLevelId;
        listener(shopLevelId);
    }

    public void setStorey(String storey) {
        this.storey = storey;
        listener(storey);
    }

    public void setBankNo(String bankNo) {
        this.bankNo = bankNo;
        listener(bankNo);
    }

    public void setCharged(Integer charged) {
        this.charged = charged;
        listener(charged);
    }

    public void setShopIds(List<Long> shopIds) {
        this.shopIds = shopIds;
        listener(shopIds);
    }

    @Override
    public void setStartTime(Object startTime) {
        super.setStartTime(startTime);
        listener(startTime);
    }

    @Override
    public void setEndTime(Object endTime) {
        super.setEndTime(endTime);
        listener(endTime);
    }

    private void listener(Object o){
        if (o!=null){
            if (StringUtils.isBlank(o.toString())){
                return;
            }
            this.exc=true;
        }
    }
}
